<template>
  <page-body>
    <view class="page">
      <view class="flex align-stretch benben-position-layout flex inviteFirend_flex_0"
        :style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
        <view class='flex align-center justify-between flex-sub inviteFirend_fd0_0'>
          <view class='flex align-center inviteFirend_fd0_0_c0' @tap.stop="handleJumpDiy" data-type="back" data-url="1">
            <text class='fu-iconfont2  inviteFirend_fd0_0_c0_c0'>&#xE794;</text>
          </view>
          <view class='flex align-center'>
            <text class='inviteFirend_fd0_0_c1_c0'>邀请好友</text>
          </view>
          <view class='flex align-center justify-end inviteFirend_fd0_0_c0' @tap.stop="handleJumpDiy"
            data-type="navigateTo" :data-url="`/pages/qbgl/bindAccount/bindAccount`">
          </view>
        </view>

      </view>
      <view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>

      <view class="flex flex-direction align-stretch benben-flex-layout">
        <view class='flex flex-wrap align-center inviteFirend_fd1_0'>
          <image class='inviteFirend_fd1_0_c0' mode="aspectFill" :src='Message.avatar'></image>
          <view class='flex flex-direction flex-wrap align-stretch'>
            <text class='inviteFirend_fd1_0_c1_c0'>{{Message.nickname}}</text>
            <view class='flex flex-wrap align-center' @click.stop="copyText(Message.invite_code)">
              <text>我的邀请码：</text>
              <text>{{Message.invite_code}}</text>
              <image class='inviteFirend_fd1_0_c1_c1_c2' mode="aspectFit" :src='STATIC_URL+"153.png"'></image>
            </view>
          </view>
        </view>
        <view class='flex flex-wrap align-center justify-around inviteFirend_fd1_1'>
          <view class='flex flex-direction flex-wrap align-center inviteFirend_fd1_1_c0'>
            <text class='inviteFirend_fd1_1_c0_c0'>{{Message.sumCoin|| 0}}</text>
            <text class='inviteFirend_fd1_1_c0_c1'>总获得平台币</text>
          </view>
          <view class='flex flex-direction flex-wrap align-center inviteFirend_fd1_1_c0'>
            <text class='inviteFirend_fd1_1_c0_c0'>{{Message.invite_count|| 0}}</text>
            <text class='inviteFirend_fd1_1_c0_c1'>总邀请人</text>
          </view>
          <view class='flex flex-direction flex-wrap align-center inviteFirend_fd1_1_c0'>
            <text class='inviteFirend_fd1_1_c0_c0'>{{Message.weeksumCoin|| 0}}</text>
            <text class='inviteFirend_fd1_1_c0_c1'>本周累计平台币</text>
          </view>
        </view>
      </view>


      <benben-popup v-model="popupShow1701921205378" :mask="true" :mask-close-able="true" mode='center'>
        <!---flex布局flex布局开始-->
        <view class="flex flex-direction flex-wrap align-stretch benben-flex-layout inviteFirend_flex_2">
          <view class='flex flex-direction flex-wrap align-stretch inviteFirend_fd2_0'>
            <text class='inviteFirend_fd2_0_c0'>{{dataDetails.name}}</text>

            <scroll-view class='inviteFirend_fd2_0_c1' :scroll-y='true'>
              <view class='flex benben-scroll flex align-center'>
                <jyf-parser class='inviteFirend_fd2_0_c1_c0' :html="dataDetails.content | richTextFormat">
                </jyf-parser>
              </view>
            </scroll-view>

          </view>
          <view class='flex flex-wrap align-center justify-center inviteFirend_fd2_1'>
            <image class='inviteFirend_fd2_1_c0' mode="aspectFit" :src='STATIC_URL+"101.png"'
              @tap.stop="popupShow1701921205378=false"></image>
          </view>
        </view>

        <!---flex布局flex布局结束-->

      </benben-popup>
      <!---flex布局flex布局开始-->
      <view class="flex flex-direction flex-wrap align-stretch benben-flex-layout inviteFirend_flex_3">
        <view class='flex flex-wrap align-center justify-between inviteFirend_fd3_0'>
          <view class='flex flex-wrap align-center'>
            <text class='inviteFirend_fd3_0_c0_c0'>邀请列表 <text @tap.stop="handleJumpDiy" data-type="navigateTo"
                :data-url="`/pages/dlzc/agreements/agreements?column_id=26`" v-if="dataList.length"
                class="margin-left-sm text-sm">{{name}}</text></text>
          </view>
        </view>
        <view class='flex flex-direction flex-wrap align-stretch justify-between inviteFirend_fd3_1'>
          <template v-for='(item,key0) in dataList'>
            <view class='flex flex-wrap align-center inviteFirend_fd3_1_c0' :key='key0'>
              <view class='flex flex-wrap align-center inviteFirend_fd3_1_c0_c0'>
                <image class='inviteFirend_fd3_1_c0_c0_c0' mode="aspectFill" :src='item.avatar'></image>
              </view>
              <view class='flex flex-direction flex-wrap align-stretch flex-sub'>
                <view class='flex flex-wrap align-center justify-between'>
                  <text>{{item.nickname}}</text>
                  <text class='inviteFirend_fd3_1_c0_c1_c0_c1'>{{item.coin}}平台币</text>
                </view>
                <view class='flex flex-wrap align-center justify-between inviteFirend_fd3_1_c0_c1_c1'>
                  <text class='inviteFirend_fd3_1_c0_c1_c1_c0'>{{item.create_time}}</text>
                  <text class='inviteFirend_fd3_1_c0_c1_c1_c1'>获得</text>
                </view>
              </view>
            </view>
          </template>
          <fu-empty :pagingListLoadedAll="pagingListLoadedAll" :pagingListNoListData="pagingListNoListData"
            :listDataLength="listDataLength" :isLoadInit="isLoadInit"></fu-empty>
        </view>
      </view>

      <!---flex布局flex布局结束-->
      <benben-popup v-model="popupShow1717059054856" :mask="true" :mask-close-able="true" mode='center' :z-index='999'>
        <!---flex布局flex布局开始-->
        <view class="flex benben-flex-layout flex-wrap align-center">
          <benben-calendar-diy mode='range' year-arrow-color='#666666' month-arrow-color='#666666' start-text='开始'
            end-text='结束' :change-title='true' :change-year='true' :change-month='true'
            class=" inviteFirend_fd4_0"></benben-calendar-diy>
        </view>

        <!---flex布局flex布局结束-->

      </benben-popup>
      <view class="text-white text-lg btns" @tap.stop="handleJumpDiy" data-type="navigateTo"
        :data-url="`/pages/grzx/invite/invite`">邀请好友 </view>

    </view>
  </page-body>
</template>
<script>
  import pagingList from '@/common/mixin/paging_list.js';
  import {
    validate
  } from '@/common/utils/validate.js'

  export default {
    components: {},
    mixins: [pagingList],

    data() {
      return {
        "popupShow1717059054856": false,
        "popupShow1701921205378": false,
        "minixPagingListsApi": "",
        "pageingListApiMethod": "",
        "allowOnloadGetList": false,
        "dataList": [],
        "Message": {
          "aid": "",
          "user_money": "",
          "freeze_money": "",
          "total_consumption_money": "",
          "total_consumption_virtual_money": "",
          "total_revenue_money": "",
          "total_revenue_virtual_money": "",
          "empirical": "",
          "score": "",
          "count_score": "",
          "commission": "",
          "total_order_commission_money": "",
          "withdrawal_money": "",
          "share_money": "",
          "discounts_money": "",
          "create_time": "",
          "user_id": ""
        },
        "dataDetails": {
          "aid": "",
          "name": "",
          "thumb_img": "",
          "content": "",
          "introduce": ""
        },
        name: ''
      };
    },
    computed: {

    },
    watch: {},
    onLoad(options) {
      this.getMessageFunc()
    },
    onUnload() {

    },
    onReady() {

    },
    onShow() {
      this.getListFunc()
      this.getMoneyFunc()
    },
    onHide() {

    },
    onResize() {

    },
    onPullDownRefresh() {

    },
    onReachBottom(e) {

    },
    onPageScroll(e) {

    },
    methods: {
      //钱包-余额明细
      getListFunc() {
        this.minixPagingListsApi = global.apiUrls.post666127aa33721;
        this.pageingListApiMethod = 'get';
        this.allowOnloadGetList = false;
        this.pagingListPostDataContent = {}
        this.listData = [];
        this.dataList = this.listData;
        this.pagingListToggle();

      },
      async getMoneyFunc() {
        //请求方法
        //数据验证

        let dataMessage = await this.$api.get(global.apiUrls.post5c78c4772da97, {

        });

        if (dataMessage.data.code != 1) {
          this.$message.info(dataMessage.data.msg);
          return
        }
        let infoMessage = dataMessage.data;
        this.Message = infoMessage.data
        this.$api.post(global.apiUrls.post641568f1b6f87, {
          column_id: 26
        }).then(res => {
          if (res.data.code == 1) {
            this.name = res.data.data.name
          }
        })

      },

      pagingListPostData() {
        return this.pagingListPostDataContent
      }
    }
  };
</script>
<style lang="scss" scoped>
  .btns {
    width: 702rpx;
    background-color: #5ECA71;
    height: 88rpx;
    line-height: 88rpx;
    text-align: center;
    border-radius: 44rpx;
    position: fixed;
    bottom: 40rpx;
    left: 24rpx
  }

  .page {
    width: 100vw;
    overflow-x: hidden;
    min-height: calc(100vh - var(--window-bottom));
    background: url(image-path('36.png')) no-repeat;
    background-size: 100% auto;
  }

  .inviteFirend_flex_0 {
    background: url(image-path('36.png')) no-repeat;
    width: 750rpx;
    height: 88rpx;
    overflow: hidden;
    z-index: 10;
    top: 0rpx;
    background-size: 100% auto !important;
  }

  .inviteFirend_fd0_0_c1_c0 {
    font-size: 36rpx;
    font-weight: 500;
    color: #fff;
  }

  .inviteFirend_fd0_0_c0_c0 {
    font-size: 32rpx;
    font-weight: 500;
    color: #fff;
  }

  .inviteFirend_fd0_0_c0 {
    width: 180rpx;
  }

  .inviteFirend_fd0_0 {
    padding: 0rpx 32rpx 0rpx 32rpx;
    line-height: 88rpx;
  }

  .inviteFirend_fd1_1_c0_c1 {
    margin: 16rpx 0rpx 0rpx 0rpx;
  }

  .inviteFirend_fd1_1_c0_c0 {
    font-size: 44rpx;
    font-weight: 600;
  }

  .inviteFirend_fd1_1_c0 {
    font-size: 24rpx;
  }

  .inviteFirend_fd1_1 {
    background: var(--benbenbgColor1);
    background-size: 100% auto;
    width: 686rpx;
    margin: 50rpx auto 24rpx auto;
    border-radius: 16rpx;
    padding: 32rpx 0rpx 32rpx 0rpx;
  }

  .inviteFirend_fd1_0_c1_c1_c2 {
    width: 24rpx;
    height: 24rpx;
    border-radius: 0rpx 0rpx 0rpx 0rpx;
    margin: 0rpx 0rpx 0rpx 24rpx;
  }

  .inviteFirend_fd1_0_c1_c0 {
    font-size: 36rpx;
    margin: 0rpx 0rpx 16rpx 0rpx;
  }

  .inviteFirend_fd1_0_c0 {
    width: 112rpx;
    height: 112rpx;
    border-radius: 16rpx;
    margin: 0rpx 24rpx 0rpx 0rpx;
  }

  .inviteFirend_fd1_0 {
    width: 686rpx;
    margin: 24rpx auto 0rpx auto;
    color: var(--benbenFontColor3);
  }

  .inviteFirend_flex_2 {
    width: 540rpx;
  }

  .inviteFirend_fd2_1_c0 {
    width: 56rpx;
    height: 56rpx;
    border-radius: 28rpx 28rpx 28rpx 28rpx;
  }

  .inviteFirend_fd2_1 {
    margin: 48rpx 0rpx 0rpx 0rpx;
  }

  ::v-deep .inviteFirend_fd2_0_c1_c0 {
    width: 100%;
  }

  .inviteFirend_fd2_0_c1 {
    touch-action: none;
    height: 30vh;
  }

  .inviteFirend_fd2_0_c0 {
    color: #333333;
    font-size: 32rpx;
    font-weight: 500;
    line-height: 45rpx;
    text-align: center;
    margin: 0rpx 0rpx 24rpx 0rpx;
  }

  .inviteFirend_fd2_0 {
    background: #FFFFFF;
    border-radius: 24rpx 24rpx 24rpx 24rpx;
    padding: 28rpx 32rpx 41rpx 32rpx;
  }

  .inviteFirend_flex_3 {
    background: transparent;
    background-size: 100% auto !important;
    padding: 20rpx 0rpx 0rpx 0rpx;
  }

  .inviteFirend_fd3_1_c0_c1_c1_c1 {
    font-size: 24rpx;
    color: rgba(102, 102, 102, 1);
  }

  .inviteFirend_fd3_1_c0_c1_c1_c0 {
    color: rgba(102, 102, 102, 1);
    font-size: 24rpx;
  }

  .inviteFirend_fd3_1_c0_c1_c1 {
    margin: 16rpx 0rpx 0rpx 0rpx;
  }

  .inviteFirend_fd3_1_c0_c1_c0_c1 {
    color: rgba(245, 44, 85, 1);
  }

  .inviteFirend_fd3_1_c0_c0_c0 {
    height: 96rpx;
    border-radius: 16rpx;
    width: 96rpx;
  }

  .inviteFirend_fd3_1_c0_c0 {
    margin: 0rpx 24rpx 0rpx 0rpx;
  }

  .inviteFirend_fd3_1_c0 {
    border-bottom: 1px solid #eee;
    margin: 28rpx 0rpx 0rpx 0rpx;
    padding: 0rpx 0rpx 24rpx 0rpx;
  }

  .inviteFirend_fd3_1 {
    background: #FFFFFF;
    background-size: 100% auto !important;
    padding: 0rpx 24rpx 0rpx 24rpx;
    margin: 0rpx 32rpx 12rpx 32rpx;
  }

  .inviteFirend_fd3_0_c0_c0 {
    line-height: 45rpx;
    font-size: 32rpx;
    font-weight: 500;
    color: #333333;
    margin: 0rpx 0rpx 0rpx 24rpx;
  }

  .inviteFirend_fd3_0 {
    background: var(--benbenbgColor1);
    background-size: 100% auto;
    width: 686rpx;
    margin: 0rpx auto 0rpx auto;
    height: 80rpx;
    line-height: 80rpx;
    padding: 0rpx 32rpx 0rpx 0rpx;
    border-radius: 16rpx 16rpx 0rpx 0rpx;
  }

  .inviteFirend_fd4_0 {
    background: #ffffff;
    width: 750rpx;
    --range-bg-color: rgba(41, 121, 255, 0.13);
    --active-bg-color: rgba(41, 121, 255, 1);
  }
</style>
